package net.wanho.advice;

import net.wanho.vo.R;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * Author：汤小洋
 * Date：2024-12-13 11:27
 * Description：<描述>
 */
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler
    public R handleException(Exception e){
        e.printStackTrace();
        return R.error(e.getMessage());
    }
}
